'use strict';
/* Controller for adding a new entry*/


// old controller
blogApp.controller('commentListDelCtrl',['$scope', '$http',
     function($scope, $http) {

     $http.get('comments/'+$scope.entry.id)
          .success(function(data) {
             $scope.comments = data;
             $scope.entryId;
             console.log(data);
          });
     }
]);


blogApp.controller('commentListCtrl',['$scope', '$http',
     function($scope, $http) {

        $scope.showCommentsVar = true;

        $http.get('comments/'+$scope.entry.id)
             .success(function(data) {
                $scope.comments = data;
                $scope.entryId;
                console.log(data);
             });


         $scope.showComments = function() {
            $scope.showCommentsVar = $scope.showCommentsVar === false ? true: false;
         };
     }
]);